﻿<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="utf-8">
  <title>发起话题</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" th:href="@{/asserts/css/head.css}"/>
  <link rel="stylesheet" th:href="@{/asserts/css/layui.css}"/>
  <link rel="stylesheet" th:href="@{/asserts/css/global.css}">
  <script th:src="@{/asserts/js/layui.js}"></script>
</head>
<body >

<div class="dvhead">
	<div class="dvlogo"><a th:href="@{/index}">小小论坛</a></div>
    <div class="dvreg" th:if="${session.user==null}">
        已有账号，立即&nbsp;<a th:href="@{/login}">登录</a>
    </div>
    <div class="dvreg" th:if="${session.user!=null } ">
        <strong th:text="${session.user.username}"></strong>
        <a th:href="@{/logoutUser}"> 注销</a>
    </div>
</div>

<div class="main layui-clear">
  <div class="fly-panel" pad20>
    <h2 class="page-title">发起话题</h2>
    <div class="layui-form layui-form-pane">
      <form th:action="@{/data/addData}" method="post">
        <div class="layui-form-item">
          <label for="L_title" class="layui-form-label">标题</label>
          <div class="layui-input-block">
            <input type="text" id="L_title" name="title" required lay-verify="required" autocomplete="off" class="layui-input">
          </div>
        </div>
        <div class="layui-form-item layui-form-text">
        	<label class="layui-form-label" style="top: -2px;">描述</label>
			<div class="layui-input-block">
                <div class="editor">
                    <textarea id="content" name="dcontent" style="width:1040px;height:450px;visibility:hidden;"></textarea>
                </div>
			</div>
		</div>
        <div class="layui-form-item">
          <button class="layui-btn" type="submit" id="submit_btn">立即发布</button>
        </div>
      </form>
    </div>
  </div>
</div>

 <script type="text/javascript" charset="utf-8" th:src="@{/asserts/js/kindeditor.js}"></script>
  <script type="text/javascript">
    KE.show({
        id : 'content',
		resizeMode : 1,
        cssPath : './index.css',
        items : [
        'fontname', 'fontsize', 'textcolor', 'bgcolor', 'bold', 'italic', 'underline',
        'removeformat', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
        'insertunorderedlist', 'emoticons', 'image', 'link']
    });
  </script>
</body>
</html>